<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src ="js/jquery-1.10.2.min.js"></script>
<title>Insert title here</title>
<script type="text/javascript">
	var xmlHttp=null;
	function checkLoginName(obj){
	var uid=obj.value;
	console.log(uid);
	//如果用户名为空字符串,则不发出异步请求
	if(uid.trim().length==0){
		return;
	}
	$.ajax({
		url:"getAjaxJson",
		type:"POST",
		data:"uid="+uid,
		
		success:function(result){
			console.log(result)
		}
	});
	}

</script>
</head>
<body>
	
	<form>
		编号:<input type="text" name="uid" onblur="checkLoginName(this);">
		<input type="submit"value="查询">
	
	</form>
	
</body>
</html>